package com.xwb.pojo;

import java.util.Date;

public class Book {
	Integer bid;
	String bname;
	String bauthor;
	String bintroduction;
	String bimg;
	Date bdate;
	String breview;
	Integer bwant;
	
	public Integer getBid() {
		return bid;
	}
	public void setBid(Integer bid) {
		this.bid = bid;
	}
	public String getBname() {
		return bname;
	}
	public void setBname(String bname) {
		this.bname = bname;
	}
	public String getBauthor() {
		return bauthor;
	}
	public void setBauthor(String bauthor) {
		this.bauthor = bauthor;
	}
	public String getBintroduction() {
		return bintroduction;
	}
	public void setBintroduction(String bintroduction) {
		this.bintroduction = bintroduction;
	}
	public String getBimg() {
		return bimg;
	}
	public void setBimg(String bimg) {
		this.bimg = bimg;
	}
	public Date getBdate() {
		return bdate;
	}
	public void setBdate(Date bdate) {
		this.bdate = bdate;
	}
	public String getBreview() {
		return breview;
	}
	public void setBreview(String breview) {
		this.breview = breview;
	}
	public Integer getBwant() {
		return bwant;
	}
	public void setBwant(Integer bwant) {
		this.bwant = bwant;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((bauthor == null) ? 0 : bauthor.hashCode());
		result = prime * result + ((bdate == null) ? 0 : bdate.hashCode());
		result = prime * result + ((bid == null) ? 0 : bid.hashCode());
		result = prime * result + ((bimg == null) ? 0 : bimg.hashCode());
		result = prime * result + ((bintroduction == null) ? 0 : bintroduction.hashCode());
		result = prime * result + ((bname == null) ? 0 : bname.hashCode());
		result = prime * result + ((breview == null) ? 0 : breview.hashCode());
		result = prime * result + ((bwant == null) ? 0 : bwant.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Book other = (Book) obj;
		if (bauthor == null) {
			if (other.bauthor != null)
				return false;
		} else if (!bauthor.equals(other.bauthor))
			return false;
		if (bdate == null) {
			if (other.bdate != null)
				return false;
		} else if (!bdate.equals(other.bdate))
			return false;
		if (bid == null) {
			if (other.bid != null)
				return false;
		} else if (!bid.equals(other.bid))
			return false;
		if (bimg == null) {
			if (other.bimg != null)
				return false;
		} else if (!bimg.equals(other.bimg))
			return false;
		if (bintroduction == null) {
			if (other.bintroduction != null)
				return false;
		} else if (!bintroduction.equals(other.bintroduction))
			return false;
		if (bname == null) {
			if (other.bname != null)
				return false;
		} else if (!bname.equals(other.bname))
			return false;
		if (breview == null) {
			if (other.breview != null)
				return false;
		} else if (!breview.equals(other.breview))
			return false;
		if (bwant == null) {
			if (other.bwant != null)
				return false;
		} else if (!bwant.equals(other.bwant))
			return false;
		return true;
	}
	@Override
	public String toString() {
		return "Book [bid=" + bid + ", bname=" + bname + ", bauthor=" + bauthor + ", bintroduction=" + bintroduction
				+ ", bimg=" + bimg + ", bdate=" + bdate + ", breview=" + breview + ", bwant=" + bwant + "]";
	}
	
	public Book(Integer bid, String bname, String bauthor, String bintroduction, String bimg, Date bdate,
			String breview, Integer bwant) {
		super();
		this.bid = bid;
		this.bname = bname;
		this.bauthor = bauthor;
		this.bintroduction = bintroduction;
		this.bimg = bimg;
		this.bdate = bdate;
		this.breview = breview;
		this.bwant = bwant;
	}
	
	public Book() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	
}
